<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     
    <html xmlns="http://www.w3.org/1999/xhtml">
    
<head>
    <title>Android BuildConfig.DEBUG的妙用 - lzqjfly的专栏
        - 博客频道 - CSDN.NET</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="在Android开发中，我们使用android.util.Log来打印日志，方便我们的开发调试。但是这些代码不想在发布后执行，我们并不想在软件发布后调试日志被其他开发者看到，现在我的方法是设置一个全局变量，标记软件为Debug模式还是Release模式。来看下代码：123456789101112131415161718192021" />
    <script src="http://static.blog.csdn.net/scripts/jquery.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://static.blog.csdn.net/scripts/ad.js?v=1.1"></script>
        <!--new top-->
               <link rel="stylesheet" href="http://static.csdn.net/public/common/toolbar/css/index.css">        <!--new top-->

    <link rel="Stylesheet" type="text/css" href="http://static.blog.csdn.net/skin/default/css/style.css?v=1.1" />
    <link id="RSSLink" title="RSS" type="application/rss+xml" rel="alternate" href="/lzqjfly/rss/list" />
    <link rel="shortcut icon" href="http://csdnimg.cn/public/favicon.ico" />
    <link type="text/css" rel="stylesheet" href="http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/default.css" />
 

</head>
<body>
    
   
      <!--new top-->
    <script id="toolbar-tpl-scriptId" fixed="true" prod="blog" skin="black" src="http://static.csdn.net/public/common/toolbar/js/html.js" type="text/javascript"></script>
     <!--new top-->
    <div id="container">
        <div id="header">
    <div class="header">
        <div id="blog_title">
            <h2>
                <a href="http://blog.csdn.net/lzqjfly">lzqjfly的专栏</a></h2>
            <h3></h3>
            <div class="clear">
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
</div>
<div id="navigator">
    <div class="navigator_bg">
    </div>
    <div class="navigator">
        <ul>
                <li id="btnContents"><a href="http://blog.csdn.net/lzqjfly?viewmode=contents"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_mulu'])">
                    <img src="http://static.blog.csdn.net/images/ico_list.gif">目录视图</span></a></li>
                <li id="btnView"><a href="http://blog.csdn.net/lzqjfly?viewmode=list"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_zhaiyao'])">
                    <img src="http://static.blog.csdn.net/images/ico_summary.gif">摘要视图</span></a></li>
                <li id="btnRss"><a href="http://blog.csdn.net/lzqjfly/rss/list"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_RSS'])">
                    <img src="http://static.blog.csdn.net/images/ico_rss.gif">订阅</span></a></li>

            </ul>
    </div>
</div>
<script type="text/javascript">
    var username = "lzqjfly";
    var _blogger = username;
    var blog_address = "http://blog.csdn.net/lzqjfly";
    var static_host = "http://static.blog.csdn.net";
    var currentUserName = "";
</script>

        <div id="body">
            <div id="main">
                <div class="main">
<div class="notice tracking-ad" data-mod='popu_3' > 

<a href="http://blog.csdn.net/blogdevteam/article/details/25387451"target="_blank">
<font color=blue>有奖征资源，博文分享有内涵
</font></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="http://blog.csdn.net/blogdevteam/article/details/29379593"target="_blank">
<font color=red>5月推荐博文汇总 
</font></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://blog.csdn.net/blogdevteam/article/details/26512525"target="_blank">
<font color=blue>大数据读书汇--获奖名单公布 
</font></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://vote.blog.csdn.net/contest/"target="_blank">
<font color=red>2014 CSDN博文大赛 
</font></a>

</div>                    <link href="http://static.blog.csdn.net/css/comment1.css" type="text/css" rel="stylesheet" />
<link href="http://static.blog.csdn.net/css/style1.css" type="text/css" rel="stylesheet" />
<script language='JavaScript' type='text/javascript' src='http://download.csdn.net/js/jquery.cookie.js'></script>
<script type="text/javascript" src="http://csdnimg.cn/rabbit/search-service/main.js"></script>
<div id="article_details" class="details">
    <div class="article_title">   
         <span class="ico ico_type_Repost"></span>


    <h1>
        <span class="link_title"><a href="/lzqjfly/article/details/12947857">
        Android BuildConfig.DEBUG的妙用
        </a></span>
    </h1>
</div>

    <div class="article_manage">
        <span class="link_categories">
        分类：
            <a href="/lzqjfly/article/category/1215686" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_fenlei']);">andorid基础知识</a> 
            <a href="/lzqjfly/article/category/1401932" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_fenlei']);">android开发项目经验分享</a> 
        </span>
    <span class="link_postdate">2013-10-22 15:06</span>
    <span class="link_view" title="阅读次数">853人阅读</span>
    <span class="link_comments" title="评论次数"><a href="#comments" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_pinglun'])">评论</a>(0)</span>
    <span class="link_collect"><a href="javascript:void(0);" onclick="javascript:_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_shoucang']);collectArticle('Android BuildConfig.DEBUG的妙用','12947857');return false;" title="收藏">收藏</a></span>
    <span class="link_report"><a href="#report"  onclick="javascript:_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_jubao']);report(12947857,2);return false;" title="举报">举报</a></span>
    
</div>

    
<div id="article_content" class="article_content">

<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
<br>
</p>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
在Android开发中，我们使用android.util.Log来打印日志，方便我们的开发调试。但是这些代码不想在发布后执行，我们并不想在软件发布后调试日志被其他开发者看到，现在我的方法是设置一个全局变量，标记软件为Debug模式还是Release模式。来看下代码：</p>
<span style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline"></span>
<div class="highlight" style="margin:0px; padding:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; background-color:rgb(0,43,54); overflow-y:hidden; overflow-x:auto; border:1px solid rgb(5,35,43)!important">
<table style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; font-size:18px; vertical-align:baseline; border-collapse:collapse; border-spacing:0px">
<tbody style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
<tr style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
<td class="gutter" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; font-size:18px; vertical-align:middle">
<pre class="line-numbers" style=""><span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">1</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">2</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">3</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">4</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">5</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">6</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">7</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">8</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">9</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">10</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">11</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">12</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">13</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">14</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">15</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">16</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">17</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">18</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">19</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">20</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">21</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">22</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">23</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">24</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">25</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">26</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">27</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">28</span>
</pre>
</td>
<td class="code" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; font-size:18px; vertical-align:middle; width:749px">
<pre style=""><code class="ruby" style="margin:0px; border:0px; font-style:inherit; font-variant:inherit; line-height:1.45em; vertical-align:baseline; overflow-y:hidden; display:block; overflow-x:auto; background-color:rgb(0,0,0); padding:0.8em!important; font-family:Menlo,Monaco,'Andale Mono','lucida console','Courier New',monospace!important"><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline"><span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">public</span> <span class="k" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(203,75,22)!important">class</span> <span class="nc" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(211,54,130)!important">Log</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">{</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">private</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">static</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">final</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">boolean</span> <span class="no" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(181,137,0)!important">DEBUG</span> <span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">=</span> <span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">true</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">;</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">public</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">static</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">void</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">i</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="nb" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(133,153,0)!important">String</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">tag</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">,</span> <span class="nb" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(133,153,0)!important">String</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">msg</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">)</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">{</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">      <span class="k" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(203,75,22)!important">if</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="no" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(181,137,0)!important">DEBUG</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">)</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">          <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">android</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">util</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">Log</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">i</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">tag</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">,</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">msg</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">);</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">}</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">public</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">static</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">void</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">e</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="nb" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(133,153,0)!important">String</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">tag</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">,</span> <span class="nb" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(133,153,0)!important">String</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">msg</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">)</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">{</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">      <span class="k" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(203,75,22)!important">if</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="no" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(181,137,0)!important">DEBUG</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">)</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">          <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">android</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">util</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">Log</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">e</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">tag</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">,</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">msg</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">);</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">}</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">public</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">static</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">void</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">d</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="nb" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(133,153,0)!important">String</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">tag</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">,</span> <span class="nb" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(133,153,0)!important">String</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">msg</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">)</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">{</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">      <span class="k" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(203,75,22)!important">if</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="no" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(181,137,0)!important">DEBUG</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">)</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">          <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">android</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">util</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">Log</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">d</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">tag</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">,</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">msg</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">);</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">}</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">public</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">static</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">void</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">v</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="nb" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(133,153,0)!important">String</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">tag</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">,</span> <span class="nb" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(133,153,0)!important">String</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">msg</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">)</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">{</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">      <span class="k" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(203,75,22)!important">if</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="no" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(181,137,0)!important">DEBUG</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">)</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">          <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">android</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">util</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">Log</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">v</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">tag</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">,</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">msg</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">);</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">}</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">public</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">static</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">void</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">w</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="nb" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(133,153,0)!important">String</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">tag</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">,</span> <span class="nb" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(133,153,0)!important">String</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">msg</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">)</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">{</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">      <span class="k" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(203,75,22)!important">if</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="no" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(181,137,0)!important">DEBUG</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">)</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">          <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">android</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">util</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">Log</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">w</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">(</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">tag</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">,</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">msg</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">);</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">  <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">}</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline"><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">}</span>
</span></code></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
这样打包发布之前只要改下DEBUG=false就行了，但是每次在发布之前都要手动去改这个变量，不是很方便，而且不排除开发者忘记改的情况。那么有没有更好更方便的做法呢？</p>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
ADT(r17)发布以后，Google为我们提供了一种新的调试机制，即BuildConfig.DEBUG。</p>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
ADT 17.0.0的New build features第二条如下描述:</p>
<blockquote style="margin:0px 0px 0.5em; padding:0px 0px 0px 1.5em; border-width:0px 0px 0px 4px; border-left-style:solid; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; font-style:italic; line-height:1.5em; font-size:1.2em; vertical-align:baseline; quotes:none; position:relative; color:rgb(34,34,34); background-color:rgb(248,248,248)">
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; font-size:22px; vertical-align:baseline">
Added a feature that allows you to run some code only in debug mode. Builds now generate a class called BuildConfig containing a DEBUGconstant that is automatically set according to your build type. You can check the (BuildConfig.DEBUG) constant in your code
 to run debug-only functions.</p>
</blockquote>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
即：新增了一个特性，允许开发者只在Debug模式下运行部分代码。Builds会生成一个叫做BuildConfig的类，该类包含一个名为DEBUG的常量，其常量&#20540;会依据开发者的Build类型自动设定。如此，便可以利用BuildConfig.DEBUG来实现只在Debug模式下运行的代码。</p>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
如果你的ADT已经更新到17及以上版本，可以尝试在Eclipse中新建一个Android工程，你会发现和R.java同级目录下多了一个叫做BuildConfig.java的类，其内容如下：</p>
<span style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline"></span>
<div class="highlight" style="margin:0px; padding:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; background-color:rgb(0,43,54); overflow-y:hidden; overflow-x:auto; border:1px solid rgb(5,35,43)!important">
<table style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; font-size:18px; vertical-align:baseline; border-collapse:collapse; border-spacing:0px">
<tbody style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
<tr style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
<td class="gutter" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; font-size:18px; vertical-align:middle">
<pre class="line-numbers" style=""><span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">1</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">2</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">3</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">4</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">5</span>
<span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">6</span>
</pre>
</td>
<td class="code" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; font-size:18px; vertical-align:middle; width:757px">
<pre style=""><code class="ruby" style="margin:0px; border:0px; font-style:inherit; font-variant:inherit; line-height:1.45em; vertical-align:baseline; overflow-y:hidden; display:block; overflow-x:auto; background-color:rgb(0,0,0); padding:0.8em!important; font-family:Menlo,Monaco,'Andale Mono','lucida console','Courier New',monospace!important"><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline"><span class="sr" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(42,161,152)!important">/** Automatically generated file. DO NOT MODIFY */</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline"><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">package</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">com</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">boohee</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">one</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">;</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline"><span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">public</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">final</span> <span class="k" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(203,75,22)!important">class</span> <span class="nc" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(211,54,130)!important">BuildConfig</span> <span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">{</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">    <span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">public</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">final</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">static</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">boolean</span> <span class="no" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(181,137,0)!important">DEBUG</span> <span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">=</span> <span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">true</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">;</span>
</span><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline"><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">}</span>
</span></code></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
这样只需要改动一行代码就ok了，</p>
<span style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline"></span>
<div class="highlight" style="margin:0px; padding:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; background-color:rgb(0,43,54); overflow-y:hidden; overflow-x:auto; border:1px solid rgb(5,35,43)!important">
<table style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; font-size:18px; vertical-align:baseline; border-collapse:collapse; border-spacing:0px">
<tbody style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
<tr style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
<td class="gutter" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; font-size:18px; vertical-align:middle">
<pre class="line-numbers" style=""><span class="line-number" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(88,110,117)!important">1</span>
</pre>
</td>
<td class="code" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; font-size:18px; vertical-align:middle; width:757px">
<pre style=""><code class="ruby" style="margin:0px; border:0px; font-style:inherit; font-variant:inherit; line-height:1.45em; vertical-align:baseline; overflow-y:hidden; display:block; overflow-x:auto; background-color:rgb(0,0,0); padding:0.8em!important; font-family:Menlo,Monaco,'Andale Mono','lucida console','Courier New',monospace!important"><span class="line" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline"><span class="kp" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important; color:rgb(203,75,22)!important">private</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">static</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">final</span> <span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">boolean</span> <span class="no" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(181,137,0)!important">DEBUG</span> <span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">=</span> <span class="no" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(181,137,0)!important">BuildConifg</span><span class="o" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; font-weight:bold!important">.</span><span class="n" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline; color:rgb(38,139,210)!important">DEBUG</span><span class="p" style="margin:0px; padding:0px; border:0px; font-family:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">;</span>
</span></code></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
在上面提到，DEBUG会根据Build类型自动设定。那么Build类型又从哪里区分呢？很简单，点开Eclipse的Project菜单便可见分晓，如下图：</p>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
<img src="http://stormzhang.github.io/images/eclipse_build1.jpg" alt="" style="">&nbsp;<img src="http://stormzhang.github.io/images/eclipse_build2.jpg" alt="" style=""></p>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
可见，Build类型分为Build Project和Build Automatically，即手动和自动。</p>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
需要注意的是，如果直接通过Eclipse运行Project，则不论Build是手动还是自动，DEBUG均不会被设定为false。这是为什么呢？这就牵涉到Android 签名的问题，这里只简单提一下，不赘述：直接通过Eclipse运行Project，Eclipse会在工程Build完毕后在bin目录下生成一个apk，这个apk的签名是调试模式（debug mode），和发布模式（release mode）签名生成的apk略有不同。如此，该问题产生原因便浮出水面。</p>
<p style="margin-top:0px; margin-bottom:0.5em; padding-top:0px; padding-bottom:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; color:rgb(34,34,34); background-color:rgb(248,248,248)">
此时肯定会有人说，直接使用Android Tools–&gt;Export Signed Application Package导出的release mode apk，其DEBUG就是false。这是不对的。在生成Release版时，需要区分Build的类型。如果选择的是自动Build，那么DEBUG仍然会被设定为true。所以在生成Release版时，请按照下面这个步骤进行打包，BuildConfig.DEBUG会被修改为false：</p>
<ol style="margin:0px 0px 0.5em; padding:0px; border:0px; font-family:'PT Serif',Georgia,Times,'Times New Roman',serif; line-height:27.59375px; font-size:18px; vertical-align:baseline; list-style-position:initial; color:rgb(34,34,34); background-color:rgb(248,248,248)">
<li style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
Project -&gt; Build Automatically，即取消Build Automatically</li><li style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
Project -&gt; Clean</li><li style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
Project -&gt; Build</li><li style="margin:0px; padding:0px; border:0px; font-family:inherit; font-style:inherit; font-variant:inherit; line-height:inherit; vertical-align:baseline">
Android Tools -&gt; Export Android application</li></ol>
<div><span style="font-family:PT Serif,Georgia,Times,Times New Roman,serif; font-size:18px; color:#222222"><span style="line-height:27.59375px">转自:&nbsp;http://stormzhang.github.io/blog/2013/08/28/android-use-build-config/</span></span></div>

</div>



<!-- Baidu Button BEGIN -->
<div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare" style="float: right;">
<a class="bds_qzone"></a>
<a class="bds_tsina"></a>
<a class="bds_tqq"></a>
<a class="bds_renren"></a>
<a class="bds_t163"></a>
<span class="bds_more">更多</span>
<a class="shareCount"></a>
</div>
<!-- Baidu Button END -->


<!--192.168.100.33-->
<ul class="article_next_prev">
            <li class="prev_article"><span  onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_shangyipian']);location.href='/lzqjfly/article/details/12849849';">上一篇</span><a href="/lzqjfly/article/details/12849849" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_shangyipian'])">Eclipse打JAR包,插件FatJar安装与使用</a></li>
            <li class="next_article"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_xiayipian']);location.href='/lzqjfly/article/details/16963645';">下一篇</span><a href="/lzqjfly/article/details/16963645" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_xiayipian'])">RadioGroup中RadioButton不能互斥</a></li>
</ul>

<!-- Baidu Button BEGIN -->
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=1536434" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
    document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script>
<!-- Baidu Button END -->

</div>
      <dl class="blog-associat-tag">
        <dt>主题推荐</dt>
        <dd>
                <a href="http://www.csdn.net/tag/android" target="_blank" class="blog-tage-red" >android</a> 
                <a href="http://www.csdn.net/tag/android开发" target="_blank" class="blog-tage-red" >android开发</a> 
                <a href="http://www.csdn.net/tag/全局变量" target="_blank" class="blog-tage-red" >全局变量</a> 
                <a href="http://www.csdn.net/tag/开发者" target="_blank" class="blog-tage-red" >开发者</a> 
                <a href="http://www.csdn.net/tag/application" target="_blank" class="blog-tage-red" >application</a> 
        </dd>
    </dl> 


<dl class="blog-ass-articl tracking-ad"  data-mod="popu_36" id="res-relatived"> 
     <dt><span>猜你在找</span></dt>    
</dl>

<script type="text/javascript">
    var searchtitletags = 'Android BuildConfig.DEBUG的妙用' + ',' + 'android,android开发,全局变量,开发者,application';
    searchService({
        index: 'blog',
        query: searchtitletags,
        from: 10,
        size: 10,
        appendTo: '#res-relatived',
        url: 'recommend',
        his: 2,
        client: "blog_cf_enhance",
        tmpl: '<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="#{ url }" title="#{ title }" strategy="#{ strategy }">#{ title }</a></dd>'
    });

 </script>   

    <div id="ad_cen">
        <script type="text/javascript">            BAIDU_CLB_SLOT_ID = "117306";</script>
        <script type="text/javascript" src="http://cbjs.baidu.com/js/o.js"></script>
    </div>
    <script type="text/javascript">
        //new Ad(4, 'ad_cen');
    </script>
<div id="comment_title" class="panel_head">
    查看评论<a name="comments"></a></div>
<div id="comment_list">
</div>
<div id="comment_bar">
</div>
<div id="comment_form">
</div>
<div class="announce">
    * 以上用户言论只代表其个人观点，不代表CSDN网站的观点或立场<a name="reply"></a><a name="quote"></a></div>
<script type="text/javascript">
    var fileName = '12947857';
    var commentscount = 0;
    var islock = false
</script>
<script type="text/javascript" src="http://static.blog.csdn.net/scripts/comment.js"></script>
    <div id="ad_bot">
    </div>
    <script type="text/javascript">
    new Ad(5, 'ad_bot');
    </script>
<div id="report_dialog">
</div>

<div id="d-top"  style="bottom:60px;">
      

       <a id="quick-reply" class="btn btn-top q-reply" title="快速回复" style="display:none;">
            <img src="http://static.blog.csdn.net/images/blog-icon-reply.png" alt="快速回复">
        </a>    

    <a id="d-top-a" class="btn btn-top backtop"  style="display: none;" title="返回顶部" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_huidaodingbu'])" style="">         
         <img src="http://static.blog.csdn.net/images/top.png" alt="TOP">
    </a>
</div>
<script type="text/javascript">
    $(function ()
    {
        if($("#comment_content").length>0)
        {
            $("#quick-reply").show();

            $("#quick-reply").click(function(){
                setEditorFocus();
            });
        }       
     
        var d_top = $('#d-top-a');
        document.onscroll = function ()
        {
            var scrTop = (document.body.scrollTop || document.documentElement.scrollTop);
            if (scrTop > 500)
            {
                d_top.show();
            } else
            {
                d_top.hide();
            }
        }
        $('#d-top-a').click(function ()
        {
            scrollTo(0, 0);
            this.blur();
            return false;
        });
    });
  
</script>
<style type="text/css">
    .tag_list
    {
        background: none repeat scroll 0 0 #FFFFFF;
        border: 1px solid #D7CBC1;
        color: #000000;
        font-size: 12px;
        line-height: 20px;
        list-style: none outside none;
        margin: 10px 2% 0 1%;
        padding: 1px;
    }
    .tag_list h5
    {
        background: none repeat scroll 0 0 #E0DBD3;
        color: #47381C;
        font-size: 12px;
        height: 24px;
        line-height: 24px;
        padding: 0 5px;
        margin: 0;
    }
    .tag_list h5 a
    {
        color: #47381C;
    }
    .classify
    {
        margin: 10px 0;
        padding: 4px 12px 8px;
    }
    .classify a
    {
        margin-right: 20px;
        white-space: nowrap;
    }
</style>
<div class="tag_list">
    <h5>
        <a href="http://www.csdn.net/tag/" target="_blank">核心技术类目</a></h5>
    <div class="classify">
<a title="全部主题" href="http://www.csdn.net/tag" target="_blank" onclick="LogClickCount(this,336);">全部主题</a>
<a title="Java" href="http://www.csdn.net/tag/Java" target="_blank" onclick="LogClickCount(this,336);">Java</a>
<a title="VPN" href="http://www.csdn.net/tag/vpn" target="_blank" onclick="LogClickCount(this,336);">VPN</a>
<a title="Android" href="http://www.csdn.net/tag/android" target="_blank" onclick="LogClickCount(this,336);">Android</a>
<a title="iOS" href="http://www.csdn.net/tag/ios" target="_blank" onclick="LogClickCount(this,336);">iOS</a>
<a title="ERP" href="http://www.csdn.net/tag/erp" target="_blank" onclick="LogClickCount(this,336);">ERP</a>
<a title="IE10" href="http://www.csdn.net/tag/ie10" target="_blank" onclick="LogClickCount(this,336);">IE10</a>
<a title="Eclipse" href="http://www.csdn.net/tag/eclipse" target="_blank" onclick="LogClickCount(this,336);">Eclipse</a>
<a title="CRM" href="http://www.csdn.net/tag/crm" target="_blank" onclick="LogClickCount(this,336);">CRM</a>
<a title="JavaScript" href="http://www.csdn.net/tag/javascript" target="_blank" onclick="LogClickCount(this,336);">JavaScript</a>
<a title="Ubuntu" href="http://www.csdn.net/tag/ubuntu" target="_blank" onclick="LogClickCount(this,336);">Ubuntu</a>
<a title="NFC" href="http://www.csdn.net/tag/nfc" target="_blank" onclick="LogClickCount(this,336);">NFC</a>
<a title="WAP" href="http://www.csdn.net/tag/wap" target="_blank" onclick="LogClickCount(this,336);">WAP</a>
<a title="jQuery" href="http://www.csdn.net/tag/jquery" target="_blank" onclick="LogClickCount(this,336);">jQuery</a>
<a title="数据库" href="http://www.csdn.net/tag/数据库" target="_blank" onclick="LogClickCount(this,336);">数据库</a>
<a title="BI" href="http://www.csdn.net/tag/bi" target="_blank" onclick="LogClickCount(this,336);">BI</a>
<a title="HTML5" href="http://www.csdn.net/tag/html5" target="_blank" onclick="LogClickCount(this,336);">HTML5</a>
<a title="Spring" href="http://www.csdn.net/tag/spring" target="_blank" onclick="LogClickCount(this,336);">Spring</a>
<a title="Apache" href="http://www.csdn.net/tag/apache" target="_blank" onclick="LogClickCount(this,336);">Apache</a>
<a title="Hadoop" href="http://www.csdn.net/tag/hadoop" target="_blank" onclick="LogClickCount(this,336);">Hadoop</a>
<a title=".NET" href="http://www.csdn.net/tag/.net" target="_blank" onclick="LogClickCount(this,336);">.NET</a>
<a title="API" href="http://www.csdn.net/tag/api" target="_blank" onclick="LogClickCount(this,336);">API</a>
<a title="HTML" href="http://www.csdn.net/tag/html" target="_blank" onclick="LogClickCount(this,336);">HTML</a>
<a title="SDK" href="http://www.csdn.net/tag/sdk" target="_blank" onclick="LogClickCount(this,336);">SDK</a>
<a title="IIS" href="http://www.csdn.net/tag/iis" target="_blank" onclick="LogClickCount(this,336);">IIS</a>
<a title="Fedora" href="http://www.csdn.net/tag/fedora" target="_blank" onclick="LogClickCount(this,336);">Fedora</a>
<a title="XML" href="http://www.csdn.net/tag/xml" target="_blank" onclick="LogClickCount(this,336);">XML</a>
<a title="LBS" href="http://www.csdn.net/tag/lbs" target="_blank" onclick="LogClickCount(this,336);">LBS</a>
<a title="Unity" href="http://www.csdn.net/tag/unity" target="_blank" onclick="LogClickCount(this,336);">Unity</a>
<a title="Splashtop" href="http://www.csdn.net/tag/splashtop" target="_blank" onclick="LogClickCount(this,336);">Splashtop</a>
<a title="UML" href="http://www.csdn.net/tag/uml" target="_blank" onclick="LogClickCount(this,336);">UML</a>
<a title="components" href="http://www.csdn.net/tag/components" target="_blank" onclick="LogClickCount(this,336);">components</a>
<a title="Windows Mobile" href="http://www.csdn.net/tag/windowsmobile" target="_blank" onclick="LogClickCount(this,336);">Windows Mobile</a>
<a title="Rails" href="http://www.csdn.net/tag/rails" target="_blank" onclick="LogClickCount(this,336);">Rails</a>
<a title="QEMU" href="http://www.csdn.net/tag/qemu" target="_blank" onclick="LogClickCount(this,336);">QEMU</a>
<a title="KDE" href="http://www.csdn.net/tag/kde" target="_blank" onclick="LogClickCount(this,336);">KDE</a>
<a title="Cassandra" href="http://www.csdn.net/tag/cassandra" target="_blank" onclick="LogClickCount(this,336);">Cassandra</a>
<a title="CloudStack" href="http://www.csdn.net/tag/cloudstack" target="_blank" onclick="LogClickCount(this,336);">CloudStack</a>
<a title="FTC" href="http://www.csdn.net/tag/ftc" target="_blank" onclick="LogClickCount(this,336);">FTC</a>
<a title="coremail" href="http://www.csdn.net/tag/coremail" target="_blank" onclick="LogClickCount(this,336);">coremail</a>
<a title="OPhone " href="http://www.csdn.net/tag/ophone " target="_blank" onclick="LogClickCount(this,336);">OPhone </a>
<a title="CouchBase" href="http://www.csdn.net/tag/couchbase" target="_blank" onclick="LogClickCount(this,336);">CouchBase</a>
<a title="云计算" href="http://www.csdn.net/tag/云计算" target="_blank" onclick="LogClickCount(this,336);">云计算</a>
<a title="iOS6" href="http://www.csdn.net/tag/iOS6" target="_blank" onclick="LogClickCount(this,336);">iOS6</a>
<a title="Rackspace " href="http://www.csdn.net/tag/rackspace " target="_blank" onclick="LogClickCount(this,336);">Rackspace </a>
<a title="Web App" href="http://www.csdn.net/tag/webapp" target="_blank" onclick="LogClickCount(this,336);">Web App</a>
<a title="SpringSide" href="http://www.csdn.net/tag/springside" target="_blank" onclick="LogClickCount(this,336);">SpringSide</a>
<a title="Maemo" href="http://www.csdn.net/tag/maemo" target="_blank" onclick="LogClickCount(this,336);">Maemo</a>
<a title="Compuware" href="http://www.csdn.net/tag/compuware" target="_blank" onclick="LogClickCount(this,336);">Compuware</a>
<a title="大数据" href="http://www.csdn.net/tag/大数据" target="_blank" onclick="LogClickCount(this,336);">大数据</a>
<a title="aptech" href="http://www.csdn.net/tag/aptech" target="_blank" onclick="LogClickCount(this,336);">aptech</a>
<a title="Perl" href="http://www.csdn.net/tag/perl" target="_blank" onclick="LogClickCount(this,336);">Perl</a>
<a title="Tornado" href="http://www.csdn.net/tag/tornado" target="_blank" onclick="LogClickCount(this,336);">Tornado</a>
<a title="Ruby" href="http://www.csdn.net/tag/ruby" target="_blank" onclick="LogClickCount(this,336);">Ruby</a>
<a title="Hibernate" href="http://www.csdn.net/hibernate" target="_blank" onclick="LogClickCount(this,336);">Hibernate</a>
<a title="ThinkPHP" href="http://www.csdn.net/tag/thinkphp" target="_blank" onclick="LogClickCount(this,336);">ThinkPHP</a>
<a title="Spark" href="http://www.csdn.net/tag/spark" target="_blank" onclick="LogClickCount(this,336);">Spark</a>
<a title="HBase" href="http://www.csdn.net/tag/hbase" target="_blank" onclick="LogClickCount(this,336);">HBase</a>
<a title="Pure" href="http://www.csdn.net/tag/pure" target="_blank" onclick="LogClickCount(this,336);">Pure</a>
<a title="Solr" href="http://www.csdn.net/tag/solr" target="_blank" onclick="LogClickCount(this,336);">Solr</a>
<a title="Angular" href="http://www.csdn.net/tag/angular" target="_blank" onclick="LogClickCount(this,336);">Angular</a>
<a title="Cloud Foundry" href="http://www.csdn.net/tag/cloudfoundry" target="_blank" onclick="LogClickCount(this,336);">Cloud Foundry</a>
<a title="Redis" href="http://www.csdn.net/tag/redis" target="_blank" onclick="LogClickCount(this,336);">Redis</a>
<a title="Scala" href="http://www.csdn.net/tag/scala" target="_blank" onclick="LogClickCount(this,336);">Scala</a>
<a title="Django" href="http://www.csdn.net/tag/django" target="_blank" onclick="LogClickCount(this,336);">Django</a>
<a title="Bootstrap" href="http://www.csdn.net/tag/bootstrap" target="_blank" onclick="LogClickCount(this,336);">Bootstrap</a>
    </div>
</div>

                    <div class="clear">
                    </div>
                </div>
            </div>
            <div id="side">
    <div class="side">
<div id="panel_Profile" class="panel">
<ul class="panel_head"><span>个人资料</span></ul>
<ul class="panel_body profile">
<div id="blog_userface">
    <a href="http://my.csdn.net/lzqjfly" target="_blank">
    <img src="http://avatar.csdn.net/5/1/E/1_lzqjfly.jpg" title="访问我的空间" style="max-width:90%"/>
    </a>
    <br />
    <span><a href="http://my.csdn.net/lzqjfly" class="user_name" target="_blank">lzqjfly</a></span>
</div>
<div class="interact">
<a href="javascript:void(0);" class="attent" id="span_add_follow" title="[加关注]" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_guanzhu'])"></a>
<a href="javascript:void(0);" class="letter" onclick="loginto(1)" title="[发私信]" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_sixin'])"></a>
</div>
<div id="blog_medal">
</div>
<ul id="blog_rank">
    <li>访问：<span>38246次</span></li>
    <li>积分：<span>792分</span></li>
    <li>排名：<span>第19852名</span></li>
</ul>
<ul id="blog_statistics">
    <li>原创：<span>36篇</span></li>
    <li>转载：<span>25篇</span></li>
    <li>译文：<span>1篇</span></li>
    <li>评论：<span>8条</span></li>
</ul>
</ul>
</div>


<div class="panel" id="panel_Search">
    <ul class="panel_head"><span>文章搜索</span></ul>
    <ul class="panel_body">
        <form id="frmSearch" action="http://so.csdn.net/search" class="form_search" target="_blank">
        <span><input id="inputSearch" type="text" class="blogsearch" title="请输入关键字" /></span>
        <input id="btnSubmit" type="submit" value="搜索" title="search in blog" />
        <input type="hidden" name="q" id="inputQ" />
        <input type="hidden" name="t" value="blog" />
        <a id="btnSearchBlog" target="_blank"></a>
        </form>
    </ul>
</div><div id="panel_Category" class="panel">
<ul class="panel_head"><span>文章分类</span></ul>
<ul class="panel_body">
             <li>
                <a href="http://blog.csdn.net/lzqjfly/article/category/1184351" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">java</a><span>(20)</span>
            </li>
             <li>
                <a href="http://blog.csdn.net/lzqjfly/article/category/1191539" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">数据库</a><span>(3)</span>
            </li>
             <li>
                <a href="http://blog.csdn.net/lzqjfly/article/category/1215686" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">andorid基础知识</a><span>(32)</span>
            </li>
             <li>
                <a href="http://blog.csdn.net/lzqjfly/article/category/1358384" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">tomcat</a><span>(1)</span>
            </li>
             <li>
                <a href="http://blog.csdn.net/lzqjfly/article/category/1401932" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">android开发项目经验分享</a><span>(8)</span>
            </li>
</ul>
</div><div id="panel_Archive" class="panel">
<ul class="panel_head"><span>文章存档</span></ul>
<ul class="panel_body">
<div id="archive_list">
<!--归档统计-->
<li><a href="http://blog.csdn.net/lzqjfly/article/month/2014/01">2014年01月</a><span>(2)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/11">2013年11月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/10">2013年10月</a><span>(2)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/09">2013年09月</a><span>(2)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/08">2013年08月</a><span>(4)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/07">2013年07月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/06">2013年06月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/05">2013年05月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/04">2013年04月</a><span>(6)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/03">2013年03月</a><span>(2)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/02">2013年02月</a><span>(5)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2013/01">2013年01月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2012/12">2012年12月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2012/11">2012年11月</a><span>(5)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2012/10">2012年10月</a><span>(13)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2012/09">2012年09月</a><span>(10)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2012/08">2012年08月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2012/07">2012年07月</a><span>(3)</span></li><li><a href="http://blog.csdn.net/lzqjfly/article/month/2012/06">2012年06月</a><span>(1)</span></li>
</div>
</ul>
</div>
<div id="hotarticls" class="panel">
<ul class="panel_head">
    <span>       
阅读排行    </span>
</ul>

<ul class="panel_body itemlist">
<li>
<a href="/lzqjfly/article/details/8024317" title="android后台进程的问题，大家各抒己见">android后台进程的问题，大家各抒己见</a><span>(9186)</span>
</li>
<li>
<a href="/lzqjfly/article/details/11981611" title="Android事件分发机制完全解析，带你从源码的角度彻底理解(上)">Android事件分发机制完全解析，带你从源码的角度彻底理解(上)</a><span>(3766)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8073248" title="android 混淆时出现的一些问题">android 混淆时出现的一些问题</a><span>(2573)</span>
</li>
<li>
<a href="/lzqjfly/article/details/9625861" title="thread exiting with uncaught exception  处理方法">thread exiting with uncaught exception  处理方法</a><span>(2063)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8589683" title="android图片上添加文字">android图片上添加文字</a><span>(1522)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8048903" title="ViewPage+Fragment的使用">ViewPage+Fragment的使用</a><span>(1082)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8849944" title="调用系统照相机保存图片和压缩小图">调用系统照相机保存图片和压缩小图</a><span>(1022)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8642997" title="Tomcat 下配置JNDI  for Oracle">Tomcat 下配置JNDI  for Oracle</a><span>(883)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8840883" title="不能访问SD卡的情况">不能访问SD卡的情况</a><span>(866)</span>
</li>
<li>
<a href="/lzqjfly/article/details/12947857" title="Android BuildConfig.DEBUG的妙用">Android BuildConfig.DEBUG的妙用</a><span>(853)</span>
</li>
</ul>
</div>
<div id="hotarticls2" class="panel">
<ul class="panel_head"><span>评论排行</span></ul>
<ul class="panel_body itemlist">
<li>
<a href="/lzqjfly/article/details/11981611" title="Android事件分发机制完全解析，带你从源码的角度彻底理解(上)">Android事件分发机制完全解析，带你从源码的角度彻底理解(上)</a><span>(6)</span>
</li>
<li>
<a href="/lzqjfly/article/details/11981769" title="Android事件分发机制完全解析，带你从源码的角度彻底理解(下)">Android事件分发机制完全解析，带你从源码的角度彻底理解(下)</a><span>(2)</span>
</li>
<li>
<a href="/lzqjfly/article/details/17993965" title="Application详解">Application详解</a><span>(0)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8840883" title="不能访问SD卡的情况">不能访问SD卡的情况</a><span>(0)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8793831" title="JAVA wait(), notify(),sleep详解">JAVA wait(), notify(),sleep详解</a><span>(0)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8642997" title="Tomcat 下配置JNDI  for Oracle">Tomcat 下配置JNDI  for Oracle</a><span>(0)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8627104" title="android的PowerManager和PowerManager.WakeLock">android的PowerManager和PowerManager.WakeLock</a><span>(0)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8622056" title="Activity进入与退出的动画">Activity进入与退出的动画</a><span>(0)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8612937" title="使用PreparedStatement防止SQL注入">使用PreparedStatement防止SQL注入</a><span>(0)</span>
</li>
<li>
<a href="/lzqjfly/article/details/8597938" title="Java栈与堆">Java栈与堆</a><span>(0)</span>
</li>
</ul>
</div>
<div id="homepageArticles" class="panel tracking-ad" data-mod="popu_4">
<ul class="panel_head"><span>推荐文章</span></ul>
<ul class="panel_body" id="ad_commend"></ul>
</div>
<script type="text/javascript">
 new Ad(12, 'ad_commend');
</script><div id="newcomments" class="panel">
<ul class="panel_head"><span>最新评论</span></ul>
<ul class="panel_body itemlist">
    <li>
   
         <a href="/lzqjfly/article/details/11981611#comments">Android事件分发机制完全解析，带你从源码的角度彻底理解(上)</a>
    <p style="margin:0px;"><a href="/s315250401" class="user_name">s315250401</a>:
看了只能说是过过瘾，但是如果自己真真弄懂，弄会路还长着呢
    </p>
    </li>
    <li>
   
         <a href="/lzqjfly/article/details/11981611#comments">Android事件分发机制完全解析，带你从源码的角度彻底理解(上)</a>
    <p style="margin:0px;"><a href="/kk2579" class="user_name">kk2579</a>:
好文章哦
    </p>
    </li>
    <li>
   
         <a href="/lzqjfly/article/details/11981769#comments">Android事件分发机制完全解析，带你从源码的角度彻底理解(下)</a>
    <p style="margin:0px;"><a href="/h315250401" class="user_name">h315250401</a>:
楼主简直是个疯人，这么吊！
    </p>
    </li>
    <li>
   
         <a href="/lzqjfly/article/details/11981769#comments">Android事件分发机制完全解析，带你从源码的角度彻底理解(上)</a>
    <p style="margin:0px;"><a href="/wangyabo08" class="user_name">wangyabo08</a>:
很不错。。看一遍就明白了不少。。
    </p>
    </li>
    <li>
   
         <a href="/lzqjfly/article/details/11981769#comments">Android事件分发机制完全解析，带你从源码的角度彻底理解(上)</a>
    <p style="margin:0px;"><a href="/bawang_cn" class="user_name">bawang_cn</a>:
很好的文章，大部分知道，只可惜别人问的时候感觉太深奥没好意思回答。。。
    </p>
    </li>
    <li>
   
         <a href="/lzqjfly/article/details/11981769#comments">Android事件分发机制完全解析，带你从源码的角度彻底理解(上)</a>
    <p style="margin:0px;"><a href="/qqscscscscscsc" class="user_name">qqscscscscscsc</a>:
好文章
    </p>
    </li>
    <li>
   
         <a href="/lzqjfly/article/details/11981769#comments">Android事件分发机制完全解析，带你从源码的角度彻底理解(下)</a>
    <p style="margin:0px;"><a href="/zhuojianhai88" class="user_name">zhuojianhai88</a>:
楼主好贴，必须顶个。阅读源码的能力看来很重要啊
    </p>
    </li>
    <li>
   
         <a href="/lzqjfly/article/details/11981769#comments">Android事件分发机制完全解析，带你从源码的角度彻底理解(上)</a>
    <p style="margin:0px;"><a href="/xxhongdev" class="user_name">xxhongdev</a>:
好文一定要顶
    </p>
    </li>
</ul>
</div>
    </div>
    <div class="clear">
    </div>
</div>

            <div class="clear">
            </div>
        </div>
        

<script type="text/javascript" src="http://csdnimg.cn/rabbit/cnick/cnick.js"></script>
<script type="text/javascript" src="http://static.blog.csdn.net/scripts/newblog.min.js"></script>


<script type="text/javascript" src="http://medal.blog.csdn.net/showblogmedal.ashx?blogid=962276"></script>
<script type="text/javascript">
    document.write('<script type="text/javascript" src="http://csdnimg.cn/pubfooter/js/publib_footer.js?' + Math.floor(new Date() / 120000).toString(36) + '="></' + 'script>');
</script>
    <script type="text/javascript" src="http://passport.csdn.net/content/loginbox/login.js"></script>
<script type="text/javascript">document.write("<img src=http://counter.csdn.net/pv.aspx?id=24 border=0 width=0 height=0>");</script>
<script type="text/javascript" src="http://www.csdn.net/ui/scripts/Csdn/counter.js"></script>
<script type="text/javascript" src="http://ad.csdn.net/scripts/ad-blog.js"></script>
<script type="text/javascript" src="http://zz.csdn.net/js/count.js"></script>
<script type="text/javascript">
    $(function () {
        function __get_code_toolbar(snippet_id) {
            return $("<a href='https://code.csdn.net/snippets/"
                    + snippet_id
                    + "' target='_blank' title='在CODE上查看代码片' style='text-indent:0;'><img src='https://code.csdn.net/assets/CODE_ico.png' width=12 height=12 alt='在CODE上查看代码片' style='position:relative;top:1px;left:2px;'/></a>"
                    + "<a href='https://code.csdn.net/snippets/"
                    + snippet_id
                    + "/fork' target='_blank' title='派生到我的代码片'  style='text-indent:0;'><img src='https://code.csdn.net/assets/ico_fork.svg' width=12 height=12 alt='派生到我的代码片' style='position:relative;top:2px;left:2px;'/></a>");
        }
        
        $("[code_snippet_id]").each(function () {
            __s_id = $(this).attr("code_snippet_id");
            if (__s_id != null && __s_id != "" && __s_id != 0 && parseInt(__s_id) > 70020) {
                __code_tool = __get_code_toolbar(__s_id);
                $(this).prev().find(".tools").append(__code_tool);
            }
        });
    });
</script>

    </div>
      <!--new top-->
    
    <script id="csdn-toolbar-id" btnId="header_notice_num" wrapId="note1" count="5" subCount="5" type="text/javascript" src="http://static.csdn.net/public/common/toolbar/js/toolbar.js"></script>     <!--new top-->
</body>
</html>
